<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('安全奖励申请')" />
    </head>
    <style>
        #febs-incentiveRewardApply  .layui-table-view[lay-table-id="incentiveRewardApplyTable"] .layui-table-body .layui-table-cell {
            height: 93px;
            line-height: 87px;
        }
    </style>
    <body class="febs-container" id="febs-incentiveRewardApply">
        <div class="febs-body layui-fluid"  lay-title="安全奖励申请" >
            <div class="febs-body-search">
                <form class="jhg-body layui-form layui-table-form" lay-filter="incentiveRewardApply-table-form" id="incentiveRewardApply-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline"  >
                                        <select name="tenantId" id="tenantId" lay-search="" lay-filter="tenantId">
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${tenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">年份</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" name="year" autocomplete="off" id="year" lay-verify="year"
                                                class="layui-input" placeholder="请选择年份">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">被奖励人</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" name="rewardUserName" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">申请人</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <select name="applyUserId" id="applyUserId" lay-search="" lay-filter="applyUserId">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">奖励类型</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <select name="rewardType" id="rewardType" lay-search="" lay-filter="rewardType">
                                            <option value="">请选择</option>
                                            <option value="1">个人奖励</option>
                                            <option value="2">活动奖励</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="incentiveRewardApplyTable" id="incentiveRewardApplyTable" lay-data="{id: 'incentiveRewardApplyTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="incentiveRewardApply-toolbar">

            <div class="layui-btn layui-btn-sm " shiro:hasPermission="incentiveRewardApply:add"
                 th:classappend="${quotaConfig }  and ${!hasHeadCompanyRole }  ? '' : 'layui-btn-disabled'"
                 th:lay-event="${quotaConfig }  and ${!hasHeadCompanyRole } ? 'add' :''">
                <em class="layui-icon">&#xe654;</em> 申请奖励
            </div>
            <div lay-event="import" class="layui-btn layui-btn-sm" shiro:hasPermission="incentiveRewardApply:import"
                 th:classappend="${quotaConfig }  and ${!hasHeadCompanyRole }  ? '' : 'layui-btn-disabled'"
                 th:lay-event="${quotaConfig }  and ${!hasHeadCompanyRole } ? 'import' :''">
                <em class="layui-icon">&#xe7aa;</em> 导入奖励
            </div>
            <div lay-event="apply" class="layui-btn layui-btn-sm" shiro:hasPermission="incentiveRewardApply:apply"
                 th:classappend="${quotaConfig }  and ${!hasHeadCompanyRole }  ? '' : 'layui-btn-disabled'"
                 th:lay-event="${quotaConfig }  and ${!hasHeadCompanyRole } ? 'apply' :''">
                <em class="layui-icon">&#xe7eb;</em> 限额申请
            </div>
        </script>
        <script type="text/html" id="incentiveRewardApply-tool">
            <span shiro:lacksPermission="incentiveRewardApply:edit,incentiveRewardApply:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            {{# if(d.status=='1'){  }}
            <a lay-event="edit" shiro:hasPermission="incentiveRewardApply:edit" th:if=" ${!hasHeadCompanyRole } ">
                <em class="layui-icon febs-edit-area febs-blue">&#xe7a4;</em></a>
            <a lay-event="del" shiro:hasPermission="incentiveRewardApply:delete" th:if=" ${!hasHeadCompanyRole } ">
                <em class="layui-icon febs-edit-area febs-red">&#xe7f9;</em></a>
            {{# }  }}
            {{# if(d.status=='4'){  }}
            <a  lay-event="upload" shiro:hasPermission="incentiveRewardApply:upload">
                <em class="layui-icon febs-edit-area febs-red">&#xe7aa;</em>
                签收表上传
            </a>
            {{# }  }}
            {{# if(d.status !='4'  && d.status !='1'){  }}
            <p>--</p>
            {{# }  }}
        </script>
        <script type="text/html" id="listStatusTransfer">
            {{# if(d.status=='1'){  }}
            <span class="layui-badge febs-tag-green">待提交</span>
            {{# }  }}
            {{# if(d.status=='2'){  }}
            <span class="layui-badge febs-tag-blue">待审核</span>
            {{# }  }}
            {{# if(d.status=='3'){  }}
            <span class="layui-badge febs-tag-orange">审核退回</span>
            {{# }  }}
            {{# if(d.status=='4'){  }}
            <span class="layui-badge febs-tag-magenta">待签发</span>
            {{# }  }}
            {{# if(d.status=='5'){  }}
            <span class="layui-badge febs-tag-gold">签发退回</span>
            {{# }  }}
            {{# if(d.status=='6'){  }}
            <span class="layui-badge febs-tag-cyan">已签发</span>
            {{# }  }}
        </script>
        <script data-th-inline="javascript" >
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
            tenantList  = [[${tenantList }]];
        </script>
        <script th:src="@{/febs/js/incentive/incentiveRewardApply/incentiveRewardApplyList.js(v=1)}"></script>
    </body>
</html>